package com.learn.springcoud.feigncodingconfig;

import feign.Contract;
import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Time : 2018/8/11 14:20
 * @Version : 1.0
 */
@Configuration
public class FeignConfigure {

    @Bean
    public Contract feignContract() {
        // 使用Feign自身的默认契约, 而FeignClientsConfiguration中使用的是SpringMVC的契约,所以可以使用SpringMVC的注解
        return new feign.Contract.Default();
    }


    @Bean
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }

}
